import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 0
 * Date: 2023-03-04
 * Time: 10:33
 */
public class Test {
    public static void main(String[] args) {
        for(int i = 1; i <= 9; i++) {
            for(int j = 1; j <= i; j++) {
                System.out.print(j+"*"+i+"="+i*j+" ");
            }
            System.out.println();
        }
    }
    public static void main11(String[] args) {
        int x = 7;
        int i = 2;
        for(; i <= Math.sqrt(x); i++) {
            if(x % i == 0) {
                System.out.println("不是素数!");
                break;
            }
        }
        if(i > Math.sqrt(x)) {
            System.out.println("是素数!");
        }
        /*int x = 7;
        int i = 2;
        for(; i < x; i++) {
            if(x % i == 0) {
                System.out.println("不是素数!");
                break;
            }
        }
        if(i == x) {
            System.out.println("是素数!");
        }*/
    }

    public static void main10(String[] args) {
        Scanner scan = new Scanner(System.in);
        Random random = new Random();
        int randNum = random.nextInt(100);
        System.out.println("作弊 " + randNum);
        while(true) {
            int n = scan.nextInt();
            if (n < randNum) {
                System.out.println("猜小了");
            }else if (n == randNum) {
                System.out.println("猜对了");
                break;
            }else {
                System.out.println("猜大了");
            }
        }
    }

    public static void main9(String[] args) {
        Scanner scan = new Scanner(System.in);
        while(scan.hasNext()) {
            int a = scan.nextInt();
            System.out.println(a);
        }
    }

    public static void main8(String[] args) {
        /*System.out.println("输出且换行");
        System.out.print("输出不换行");
        System.out.printf("%s\n","格式化输出");*/
        Scanner scan = new Scanner(System.in);
        /*System.out.println("请输入一个整数");
        int a = scan.nextInt();
        System.out.println(a);*/
        System.out.println("输入你的名字：");
        String name = scan.next();
        System.out.println(name);
        /*System.out.println("输入一个小数");
        double d = scan.nextDouble();
        System.out.println(d);*/
    }
    public static void main7(String[] args) {
        int sum = 0;
        for(int i = 1; i <= 5; i++) {

            int ret = 1;
            for(int j = 1; j <= i; j++) {
                ret *= j;
            }
            sum += ret;
        }
        System.out.println("sum = " + sum);
    }

    public static void main6(String[] args) {
        /*while (true) {
            System.out.println("fsdfsa");
        }*/
        //找到 100 - 200 中所有 3 的倍数
        /*int i = 100;
        while(i <= 200) {
            if(i % 3 != 0) {
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }*/
        //找到 100 - 200 中第一个 3 的倍数
        /*int i = 100;
        while(i <= 200) {
            if(i % 3 == 0) {
                System.out.println(i);
                break;
            }
            i++;
        }*/
    }
    public static void main5(String[] args) {
        //求1-100之间 既能被5整除 也能被6整除的数字 要求使用continue
        int i = 1;
        while(i <= 100) {
            if(i % 30 != 0) {
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }


    }
    public static void main4(String[] args) {
        int x = 1;
        int sum = 0;
        while(x <= 5) {
            int n = 1;
            int ret = 1;
            while(n <= x) {
                ret *= n;
                n++;
            }
            sum += ret;
            x++;
        }
        System.out.println(sum);

        //System.out.println(ret);
    }


    public static void main3(String[] args) {
        int i = 1;
        int sum = 0;
        while(i <= 100) {
            sum += i;
            i++;
        }
        System.out.println("sum = " + sum);

        i = 1;
        int sumOdd = 0;
        while(i <= 100) {
            sumOdd += i;
            i += 2;
        }
        System.out.println("sumOdd = " + sumOdd);

        i = 0;
        int sumEve = 0;
        while(i <= 100) {
            sumEve += i;
            i += 2;
        }
        System.out.println("sumEve = " + sumEve);
    }



    public static void main2(String[] args) {
        //int a = 3;
        String a = "hellow";
        switch (a) {
            case "hello":
                System.out.println("hello");
                break;
            case "hello1":
                System.out.println(2);
                break;
            default:
                System.out.println("asdkokaf");
                break;
        }
    }
    public static void main1(String[] args) {
        /*int i = 1;
        while(i <= 10) {
            System.out.println(i);
            i++;*/
        //求1-100之间 既能被5整除 也能被6整除的数字 要求使用continue
        /*int i = 3;
        while(i <= 100) {
            if(i % 5 ==0 && i % 6 == 0) {
                System.out.println(i);
                i++;
                continue;
            }
            i++;*/
        System.out.println("\\\"hello\\\"");
        //System.out.println("\\"hello\\"");
        System.out.println("/\"hello/\"");
    }
}
